package com.youlai.boot.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.youlai.boot.system.mapper.PackageMapper;
import com.youlai.boot.system.mapper.ProcessMapper;
import com.youlai.boot.system.model.QB.Process;
import com.youlai.boot.system.service.ProcessService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> implements ProcessService {
    private static final Logger logger = LoggerFactory.getLogger(DeviceServiceImpl.class);
    @Autowired
    private ProcessMapper processMapper;
    @Override
    public boolean saveProcess(Process process) {

        process.setAddtime(LocalDateTime.now());
        return save(process);
    }

    @Override
    public List<Process> getAllProcess() {
        return processMapper.selectList(null);
    }

    @Override
    public boolean deleteProcessById(Integer id) {
        return processMapper.deleteById(id) > 0;
    }
}
